-- background: 2707 from stack: in -- bmap block id: 3605 -- flags: 0000 -- background id: 0 -- name: Test ----- HyperTalk script ----- On openCard global questans, questkey, rightone, group hide background button "Correct!" hide field review set hilight of background button A to false set hilight of background button B to false set hilight of background button C to false set hilight of background button D to false put "Question #"&group into field "Q#" -- question # option -- get the number of card -- card # option -- put "Question #"&it-2 into field "Q#" -- card # option put rightone into item group of questkey put item group of questans into foo if foo is not empty then set hilight of background button foo to true end openCard on closeCard set lockScreen to true set hilight of background button A to false set hilight of background button B to false set hilight of background button C to false set hilight of background button D to false set lockScreen to false hide background button "Correct!" end closeCard on idle global time1 -- comment out next line (exit idle) if you want a time limit on test. -- don't forget to set time limit as described in Exam button of -- first card. exit idle put the seconds into time2 if time2 30 then go card report get item group of questlist go card it end randomNext on randomPrev global group,questlist subtract one from group if group < 1 then go first card get item group of questlist go card it end randomPrev on reView global rightone, immediate put "Correct answer is " & rightone into field review if not immediate then wait 3 seconds show field review wait until the mouseClick else if hilite of background button rightone is false then show field review wait until the mouseClick else -- show background button "Correct!" end if end if end reView -- part 1 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=16 top=68 right=138 bottom=496 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: Q1 -- part 11 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=48 top=137 right=177 bottom=499 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: D -- part 25 (button) -- low flags: 00 -- high flags: 2000 -- rect: left=204 top=313 right=342 bottom=241 -- title width / last selected line: 0 -- icon id / first selected line: 902 / 902 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Prev ----- HyperTalk script ----- on mouseUp global immediate, group, questans, refhide if item group of questans is not empty then if immediate then reView end if if refhide is false then put true into refhide hide field ReferenceField end if visual effect wipe right fast to black visual effect wipe left -- go to previous card randomPrev end mouseUp -- part 26 (button) -- low flags: 00 -- high flags: 2000 -- rect: left=297 top=313 right=342 bottom=333 -- title width / last selected line: 0 -- icon id / first selected line: 26425 / 26425 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Next ----- HyperTalk script ----- on mouseUp global immediate, group, questans, refhide if item group of questans is not empty then if immediate then reView end if if refhide is false then put true into refhide hide field ReferenceField end if visual effect wipe left fast to black visual effect wipe right fast -- go to next card randomNext end mouseUp -- part 27 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=48 top=178 right=219 bottom=508 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: D -- part 28 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=48 top=221 right=262 bottom=508 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: D -- part 29 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=47 top=264 right=306 bottom=502 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: D -- part 20 (field) -- low flags: 01 -- high flags: 0004 -- rect: left=15 top=31 right=53 bottom=166 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Q# ----- HyperTalk script ----- -- part 36 (button) -- low flags: 00 -- high flags: 2000 -- rect: left=368 top=305 right=342 bottom=406 -- title width / last selected line: 0 -- icon id / first selected line: 21700 / 21700 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Home ----- HyperTalk script ----- on mouseUp visual effect iris close go home end mouseUp -- part 38 (button) -- low flags: 80 -- high flags: 8002 -- rect: left=173 top=116 right=138 bottom=245 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Correct! -- part 39 (button) -- low flags: 00 -- high flags: 8005 -- rect: left=14 top=138 right=174 bottom=44 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: A ----- HyperTalk script ----- on mouseUp global questans, group set hilight of background button A to true set hilight of background button B to false set hilight of background button C to false set hilight of background button D to false put "A" into item group of questans end mouseUp -- part 40 (button) -- low flags: 00 -- high flags: 8005 -- rect: left=14 top=178 right=214 bottom=44 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: B ----- HyperTalk script ----- on mouseUp global questans, group set hilight of background button A to false set hilight of background button B to true set hilight of background button C to false set hilight of background button D to false put "B" into item group of questans end mouseUp -- part 41 (button) -- low flags: 00 -- high flags: 8005 -- rect: left=14 top=219 right=255 bottom=44 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: C ----- HyperTalk script ----- on mouseUp global questans, group set hilight of background button A to false set hilight of background button B to false set hilight of background button C to true set hilight of background button D to false put "C" into item group of questans end mouseUp -- part 42 (button) -- low flags: 00 -- high flags: 8005 -- rect: left=14 top=264 right=300 bottom=44 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: D ----- HyperTalk script ----- on mouseUp global questans, group set hilight of background button A to false set hilight of background button B to false set hilight of background button C to false set hilight of background button D to true put "D" into item group of questans end mouseUp -- part 43 (field) -- low flags: 81 -- high flags: 0004 -- rect: left=339 top=119 right=137 bottom=498 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 256 -- line height: 16 -- part name: review -- part 44 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=460 top=24 right=62 bottom=503 -- title width / last selected line: 0 -- icon id / first selected line: 12119 / 12119 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Reference ----- HyperTalk script ----- on mouseUp global refhide if refhide is false then put true into refhide hide field ReferenceField else put false into refhide show field ReferenceField end if end mouseUp -- part 45 (field) -- low flags: 81 -- high flags: 0004 -- rect: left=188 top=32 right=54 bottom=443 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ReferenceField